﻿using System;
namespace HtmlParser
{
    public class TagHelper
    {
        private TagHelper()
        {
            
        }

        /// <summary>
        /// Parsetags the type.
        /// </summary>
        /// <param name="tagName">Name of the tag.</param>
        /// <returns></returns>
        public static HtmlTagType ParseTagType(string tagName)
        {
            try
            {
                HtmlTagType rs = (HtmlTagType)Enum.Parse(typeof(HtmlTagType), tagName.ToUpperCamel());
                return rs;
            }
            catch (ArgumentException e)
            {
                return HtmlTagType.Unknown;
            }
        }
    }
}
